﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TrainingWorkshop.DAL_EF
{
    class TeacherRepository_EF:ITeacherRepository_EF
    {

        public List<Models.Teacher> GetAllTeachers()
        {
            List<Teacher> teacherList = new List<Teacher>();
            using (var projectbEntity = new projectbEntities())
            {
                var teacher = from teacherEntity in projectbEntity.Teachers
                              select teacherEntity;
                teacherList = teacher.ToList();
            }
            return Translator.TeacherTranslator.TransfertoModelTeacher(teacherList);
        }
    }
}
